<template>
	<view>
		<view class="item">
			<text>单位名称</text><input type="text" v-model="dbdata.data.qy_name"/>
		</view>
		<view class="item">
			<text>水表号</text><input type="text" v-model="dbdata.data.qy_num"/>
			<text>抄表月份</text><input type="text" v-model="dbdata.data.sb_year" />
		</view>
		<view class="item">
			<text>抄表时间</text><input type="text" v-model="dbdata.data.sb_time" />
		</view>
		备注
		<input type="text" v-model="dbdata.data.sb_zhuangtai">
		定位
		<input type="text" v-model="dbdata.data.qy_dazhi">
		<view class="item">
			<text>地址</text><input type="text" v-model="dbdata.data.qy_dazhi" />
		</view>
		<view class="item">
			<text>表况</text><input type="text" v-model="dbdata.data.qy_zhuantai" />
		</view>
		<view class="item">
			<text>上次抄表日期</text><input type="text" v-model="dbdata.data.sb_year" />
		</view>
		<view class="item">
			<text>上次抄表水量</text><input type="text" v-model="dbdata.data.fcgszy"/>
		</view>
		<view class="item">
			<text>正常用水范围</text><input type="text" v-model="dbdata.data.count" />
		</view>
		<view class="item">
			<text>上次抄表数</text><input type="text" v-model="dbdata.data.qy_shuileixin"/>
		</view>
		<view class="item">
			<text>本次抄表数</text><input type="text" v-model="dbdata.data.count" />
		</view>
		<view class="item">
			<text>水量</text><input type="text" v-model="dbdata.data.qy_shuileixin"/>
		</view>
		<text>现场照片</text>
		<view class="img">
			<image src="../../static/logo.png"></image>
		</view>
	</view>
</template>

<script>
	import {
		ref,
		computed,
		reactive,
		toRefs
	} from 'vue';
	import http from '../../utils/http.js';
	export default {
		setup() {
			let data = reactive({
				dbdata:{},
				// dj:()=>{
				// 	console.log(data.dbdata)
				// },
			})
			return {
				...toRefs(data)
			};
		},
		onLoad: function (option){
			const eventChannel = this.getOpenerEventChannel();
			// 监听acceptDataFromOpenerPage事件，获取上一页面通过eventChannel传送到当前页面的数据
			eventChannel.on('acceptDataFromOpenerPage', (data) => {
				console.log(1, data);
				this.dbdata=data;
			})
		}
	}
</script>

<style>
	.item {
		border-bottom: gray 1rpx solid;
		height: 100rpx;
		align-items: center;
		display: flex;
		justify-content: space-between;
	}

	.item text {
		padding-left: 10rpx;
		text-align: left;
		flex: 5;

	}

	.item input {
		flex: 7;
	}

	image {
		width: 200rpx;
		height: 200rpx;
	}
</style>
